package com.own.demo.writerfile;

import com.own.demo.utils.CommWriterFileInfo;

import java.io.BufferedWriter;
import java.io.File;

public class WriterFileUtils {

    public static void writerFoFile(String data,String folderPath,String fileName) {
        try {
            File folder = new File(folderPath);
            if (!folder.exists()) {
                boolean result = folder.mkdirs();
            }
            BufferedWriter bufferedWriter = CommWriterFileInfo.getWriterBuffer(folderPath + "\\" + fileName, false);
            CommWriterFileInfo.writer(bufferedWriter, data);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
